package com.fengwei.startup;

import com.fengwei.service.InitVerService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 初始化版本号
 */
@Component
@Order(value = 2)
public class InitVerRunner implements CommandLineRunner {
    private final Logger logger = LoggerFactory.getLogger(InitVerRunner.class);

    @Autowired
    private InitVerService initVerService;

    @Override
    public void run(String... args) throws Exception {
        initVerService.initVer();
    }
}
